(globalThis.TURBOPACK || (globalThis.TURBOPACK = [])).push([typeof document === "object" ? document.currentScript : undefined, "[project]/node_modules/next/dist/client/portal/index.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "Portal", { enumerable: true, get: function() { return Portal; } }); const _react = __turbopack_context__.r("[project]/node_modules/react/index.js [client] (ecmascript)"); const _reactdom = __turbopack_context__.r("[project]/node_modules/react-dom/index.js [client] (ecmascript)"); const Portal = (param)=>{ let { children, type } = param; const [portalNode, setPortalNode] = (0, _react.useState)(null); (0, _react.useEffect)(()=>{ const element = document.createElement(type); document.body.appendChild(element); setPortalNode(element); return ()=>{ document.body.removeChild(element); }; }, [ type ]); return portalNode ? /*#__PURE__*/ (0, _reactdom.createPortal)(children, portalNode) : null; }; if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { Object.defineProperty(exports.default, '__esModule', { value: true }); Object.assign(exports.default, exports); module.exports = exports.default; } //# sourceMappingURL=index.js.map }), "[project]/node_modules/next/dist/client/set-attributes-from-props.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "setAttributesFromProps", { enumerable: true, get: function() { return setAttributesFromProps; } }); const DOMAttributeNames = { acceptCharset: 'accept-charset', className: 'class', htmlFor: 'for', httpEquiv: 'http-equiv', noModule: 'noModule' }; const ignoreProps = [ 'onLoad', 'onReady', 'dangerouslySetInnerHTML', 'children', 'onError', 'strategy', 'stylesheets' ]; function isBooleanScriptAttribute(attr) { return [ 'async', 'defer', 'noModule' ].includes(attr); } function setAttributesFromProps(el, props) { for (const [p, value] of Object.entries(props)){ if (!props.hasOwnProperty(p)) continue; if (ignoreProps.includes(p)) continue; // we don't render undefined props to the DOM if (value === undefined) { continue; } const attr = DOMAttributeNames[p] || p.toLowerCase(); if (el.tagName === 'SCRIPT' && isBooleanScriptAttribute(attr)) { // Correctly assign boolean script attributes // https://github.com/vercel/next.js/pull/20748 ; el[attr] = !!value; } else { el.setAttribute(attr, String(value)); } // Remove falsy non-zero boolean attributes so they are correctly interpreted // (e.g. if we set them to false, this coerces to the string "false", which the browser interprets as true) if (value === false || el.tagName === 'SCRIPT' && isBooleanScriptAttribute(attr) && (!value || value === 'false')) { // Call setAttribute before, as we need to set and unset the attribute to override force async: // https://html.spec.whatwg.org/multipage/scripting.html#script-force-async el.setAttribute(attr, ''); el.removeAttribute(attr); } } } if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { Object.defineProperty(exports.default, '__esModule', { value: true }); Object.assign(exports.default, exports); module.exports = exports.default; } //# sourceMappingURL=set-attributes-from-props.js.map }), "[project]/node_modules/next/dist/client/head-manager.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { default: null, isEqualNode: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { default: function() { return initHeadManager; }, isEqualNode: function() { return isEqualNode; } }); const _setattributesfromprops = __turbopack_context__.r("[project]/node_modules/next/dist/client/set-attributes-from-props.js [client] (ecmascript)"); function reactElementToDOM(param) { let { type, props } = param; const el = document.createElement(type); (0, _setattributesfromprops.setAttributesFromProps)(el, props); const { children, dangerouslySetInnerHTML } = props; if (dangerouslySetInnerHTML) { el.innerHTML = dangerouslySetInnerHTML.__html || ''; } else if (children) { el.textContent = typeof children === 'string' ? children : Array.isArray(children) ? children.join('') : ''; } return el; } function isEqualNode(oldTag, newTag) { if (oldTag instanceof HTMLElement && newTag instanceof HTMLElement) { const nonce = newTag.getAttribute('nonce'); // Only strip the nonce if `oldTag` has had it stripped. An element's nonce attribute will not // be stripped if there is no content security policy response header that includes a nonce. if (nonce && !oldTag.getAttribute('nonce')) { const cloneTag = newTag.cloneNode(true); cloneTag.setAttribute('nonce', ''); cloneTag.nonce = nonce; return nonce === oldTag.nonce && oldTag.isEqualNode(cloneTag); } } return oldTag.isEqualNode(newTag); } function updateElements(type, components) { const headEl = document.querySelector('head'); if (!headEl) return; const oldTags = new Set(headEl.querySelectorAll("" + type + "[data-next-head]")); if (type === 'meta') { const metaCharset = headEl.querySelector('meta[charset]'); if (metaCharset !== null) { oldTags.add(metaCharset); } } const newTags = []; for(let i = 0; i < components.length; i++){ const component = components[i]; const newTag = reactElementToDOM(component); newTag.setAttribute('data-next-head', ''); let isNew = true; for (const oldTag of oldTags){ if (isEqualNode(oldTag, newTag)) { oldTags.delete(oldTag); isNew = false; break; } } if (isNew) { newTags.push(newTag); } } for (const oldTag of oldTags){ var _oldTag_parentNode; (_oldTag_parentNode = oldTag.parentNode) == null ? void 0 : _oldTag_parentNode.removeChild(oldTag); } for (const newTag of newTags){ // meta[charset] must be first element so special case if (newTag.tagName.toLowerCase() === 'meta' && newTag.getAttribute('charset') !== null) { headEl.prepend(newTag); } headEl.appendChild(newTag); } } function initHeadManager() { return { mountedInstances: new Set(), updateHead: (head)=>{ const tags = {}; head.forEach((h)=>{ if (// it won't be inlined. In this case revert to the original behavior h.type === 'link' && h.props['data-optimized-fonts']) { if (document.querySelector('style[data-href="' + h.props['data-href'] + '"]')) { return; } else { h.props.href = h.props['data-href']; h.props['data-href'] = undefined; } } const components = tags[h.type] || []; components.push(h); tags[h.type] = components; }); const titleComponent = tags.title ? tags.title[0] : null; let title = ''; if (titleComponent) { const { children } = titleComponent.props; title = typeof children === 'string' ? children : Array.isArray(children) ? children.join('') : ''; } if (title !== document.title) document.title = title; [ 'meta', 'base', 'link', 'style', 'script' ].forEach((type)=>{ updateElements(type, tags[type] || []); }); } }; } if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { Object.defineProperty(exports.default, '__esModule', { value: true }); Object.assign(exports.default, exports); module.exports = exports.default; } //# sourceMappingURL=head-manager.js.map }), "[project]/node_modules/next/dist/client/normalize-trailing-slash.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = /*#__PURE__*/ __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [client] (ecmascript)"); "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "normalizePathTrailingSlash", { enumerable: true, get: function() { return normalizePathTrailingSlash; } }); const _removetrailingslash = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js [client] (ecmascript)"); const _parsepath = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/parse-path.js [client] (ecmascript)"); const normalizePathTrailingSlash = (path)=>{ if (!path.startsWith('/') || ("TURBOPACK compile-time value", void 0)) { return path; } const { pathname, query, hash } = (0, _parsepath.parsePath)(path); if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; return "" + (0, _removetrailingslash.removeTrailingSlash)(pathname) + query + hash; }; if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { Object.defineProperty(exports.default, '__esModule', { value: true }); Object.assign(exports.default, exports); module.exports = exports.default; } //# sourceMappingURL=normalize-trailing-slash.js.map }), "[project]/node_modules/next/dist/client/add-base-path.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = /*#__PURE__*/ __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [client] (ecmascript)"); "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "addBasePath", { enumerable: true, get: function() { return addBasePath; } }); const _addpathprefix = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/add-path-prefix.js [client] (ecmascript)"); const _normalizetrailingslash = __turbopack_context__.r("[project]/node_modules/next/dist/client/normalize-trailing-slash.js [client] (ecmascript)"); const basePath = ("TURBOPACK compile-time value", "") || ''; function addBasePath(path, required) { return (0, _normalizetrailingslash.normalizePathTrailingSlash)(("TURBOPACK compile-time falsy", 0) ? "TURBOPACK unreachable" : (0, _addpathprefix.addPathPrefix)(path, basePath)); } if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { Object.defineProperty(exports.default, '__esModule', { value: true }); Object.assign(exports.default, exports); module.exports = exports.default; } //# sourceMappingURL=add-base-path.js.map }), "[project]/node_modules/next/dist/client/add-locale.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = /*#__PURE__*/ __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [client] (ecmascript)"); "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "addLocale", { enumerable: true, get: function() { return addLocale; } }); const _normalizetrailingslash = __turbopack_context__.r("[project]/node_modules/next/dist/client/normalize-trailing-slash.js [client] (ecmascript)"); const addLocale = function(path) { for(var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++){ args[_key - 1] = arguments[_key]; } if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; return path; }; if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { Object.defineProperty(exports.default, '__esModule', { value: true }); Object.assign(exports.default, exports); module.exports = exports.default; } //# sourceMappingURL=add-locale.js.map }), "[project]/node_modules/next/dist/client/trusted-types.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; /** * Stores the Trusted Types Policy. Starts as undefined and can be set to null * if Trusted Types is not supported in the browser. */ Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "__unsafeCreateTrustedScriptURL", { enumerable: true, get: function() { return __unsafeCreateTrustedScriptURL; } }); let policy; /** * Getter for the Trusted Types Policy. If it is undefined, it is instantiated * here or set to null if Trusted Types is not supported in the browser. */ function getPolicy() { if (typeof policy === 'undefined' && typeof window !== 'undefined') { var _window_trustedTypes; policy = ((_window_trustedTypes = window.trustedTypes) == null ? void 0 : _window_trustedTypes.createPolicy('nextjs', { createHTML: (input)=>input, createScript: (input)=>input, createScriptURL: (input)=>input })) || null; } return policy; } function __unsafeCreateTrustedScriptURL(url) { var _getPolicy; return ((_getPolicy = getPolicy()) == null ? void 0 : _getPolicy.createScriptURL(url)) || url; } if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { Object.defineProperty(exports.default, '__esModule', { value: true }); Object.assign(exports.default, exports); module.exports = exports.default; } //# sourceMappingURL=trusted-types.js.map }), "[project]/node_modules/next/dist/client/request-idle-callback.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { cancelIdleCallback: null, requestIdleCallback: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { cancelIdleCallback: function() { return cancelIdleCallback; }, requestIdleCallback: function() { return requestIdleCallback; } }); const requestIdleCallback = typeof self !== 'undefined' && self.requestIdleCallback && self.requestIdleCallback.bind(window) || function(cb) { let start = Date.now(); return self.setTimeout(function() { cb({ didTimeout: false, timeRemaining: function() { return Math.max(0, 50 - (Date.now() - start)); } }); }, 1); }; const cancelIdleCallback = typeof self !== 'undefined' && self.cancelIdleCallback && self.cancelIdleCallback.bind(window) || function(id) { return clearTimeout(id); }; if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { Object.defineProperty(exports.default, '__esModule', { value: true }); Object.assign(exports.default, exports); module.exports = exports.default; } //# sourceMappingURL=request-idle-callback.js.map }), "[project]/node_modules/next/dist/client/route-loader.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = /*#__PURE__*/ __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [client] (ecmascript)"); "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { createRouteLoader: null, getClientBuildManifest: null, isAssetError: null, markAssetError: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { createRouteLoader: function() { return createRouteLoader; }, getClientBuildManifest: function() { return getClientBuildManifest; }, isAssetError: function() { return isAssetError; }, markAssetError: function() { return markAssetError; } }); const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [client] (ecmascript)"); const _getassetpathfromroute = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/get-asset-path-from-route.js [client] (ecmascript)")); const _trustedtypes = __turbopack_context__.r("[project]/node_modules/next/dist/client/trusted-types.js [client] (ecmascript)"); const _requestidlecallback = __turbopack_context__.r("[project]/node_modules/next/dist/client/request-idle-callback.js [client] (ecmascript)"); const _deploymentid = __turbopack_context__.r("[project]/node_modules/next/dist/build/deployment-id.js [client] (ecmascript)"); const _encodeuripath = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/encode-uri-path.js [client] (ecmascript)"); // 3.8s was arbitrarily chosen as it's what https://web.dev/interactive // considers as "Good" time-to-interactive. We must assume something went // wrong beyond this point, and then fall-back to a full page transition to // show the user something of value. const MS_MAX_IDLE_DELAY = 3800; function withFuture(key, map, generator) { let entry = map.get(key); if (entry) { if ('future' in entry) { return entry.future; } return Promise.resolve(entry); } let resolver; const prom = new Promise((resolve)=>{ resolver = resolve; }); map.set(key, { resolve: resolver, future: prom }); return generator ? generator().then((value)=>{ resolver(value); return value; }).catch((err)=>{ map.delete(key); throw err; }) : prom; } const ASSET_LOAD_ERROR = Symbol('ASSET_LOAD_ERROR'); function markAssetError(err) { return Object.defineProperty(err, ASSET_LOAD_ERROR, {}); } function isAssetError(err) { return err && ASSET_LOAD_ERROR in err; } function hasPrefetch(link) { try { link = document.createElement('link'); return(// with relList.support !!window.MSInputMethodContext && !!document.documentMode || link.relList.supports('prefetch')); } catch (e) { return false; } } const canPrefetch = hasPrefetch(); const getAssetQueryString = ()=>{ return (0, _deploymentid.getDeploymentIdQueryOrEmptyString)(); }; function prefetchViaDom(href, as, link) { return new Promise((resolve, reject)=>{ const selector = '\n link[rel="prefetch"][href^="' + href + '"],\n link[rel="preload"][href^="' + href + '"],\n script[src^="' + href + '"]'; if (document.querySelector(selector)) { return resolve(); } link = document.createElement('link'); // The order of property assignment here is intentional: if (as) link.as = as; link.rel = "prefetch"; link.crossOrigin = ("TURBOPACK compile-time value", void 0); link.onload = resolve; link.onerror = ()=>reject(markAssetError(Object.defineProperty(new Error("Failed to prefetch: " + href), "__NEXT_ERROR_CODE", { value: "E268", enumerable: false, configurable: true }))); // `href` should always be last: link.href = href; document.head.appendChild(link); }); } function appendScript(src, script) { return new Promise((resolve, reject)=>{ script = document.createElement('script'); // The order of property assignment here is intentional. // 1. Setup success/failure hooks in case the browser synchronously // executes when `src` is set. script.onload = resolve; script.onerror = ()=>reject(markAssetError(Object.defineProperty(new Error("Failed to load script: " + src), "__NEXT_ERROR_CODE", { value: "E74", enumerable: false, configurable: true }))); // 2. Configure the cross-origin attribute before setting `src` in case the // browser begins to fetch. script.crossOrigin = ("TURBOPACK compile-time value", void 0); // 3. Finally, set the source and inject into the DOM in case the child // must be appended for fetching to start. script.src = src; document.body.appendChild(script); }); } // We wait for pages to be built in dev before we start the route transition // timeout to prevent an un-necessary hard navigation in development. let devBuildPromise; // Resolve a promise that times out after given amount of milliseconds. function resolvePromiseWithTimeout(p, ms, err) { return new Promise((resolve, reject)=>{ let cancelled = false; p.then((r)=>{ // Resolved, cancel the timeout cancelled = true; resolve(r); }).catch(reject); // We wrap these checks separately for better dead-code elimination in // production bundles. if ("TURBOPACK compile-time truthy", 1) { ; (devBuildPromise || Promise.resolve()).then(()=>{ (0, _requestidlecallback.requestIdleCallback)(()=>setTimeout(()=>{ if (!cancelled) { reject(err); } }, ms)); }); } if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; }); } function getClientBuildManifest() { if (self.__BUILD_MANIFEST) { return Promise.resolve(self.__BUILD_MANIFEST); } const onBuildManifest = new Promise((resolve)=>{ // Mandatory because this is not concurrent safe: const cb = self.__BUILD_MANIFEST_CB; self.__BUILD_MANIFEST_CB = ()=>{ resolve(self.__BUILD_MANIFEST); cb && cb(); }; }); return resolvePromiseWithTimeout(onBuildManifest, MS_MAX_IDLE_DELAY, markAssetError(Object.defineProperty(new Error('Failed to load client build manifest'), "__NEXT_ERROR_CODE", { value: "E273", enumerable: false, configurable: true }))); } function getFilesForRoute(assetPrefix, route) { if ("TURBOPACK compile-time truthy", 1) { const scriptUrl = assetPrefix + '/_next/static/chunks/pages' + (0, _encodeuripath.encodeURIPath)((0, _getassetpathfromroute.default)(route, '.js')) + getAssetQueryString(); return Promise.resolve({ scripts: [ (0, _trustedtypes.__unsafeCreateTrustedScriptURL)(scriptUrl) ], // Styles are handled by `style-loader` in development: css: [] }); } //TURBOPACK unreachable ; } function createRouteLoader(assetPrefix) { const entrypoints = new Map(); const loadedScripts = new Map(); const styleSheets = new Map(); const routes = new Map(); function maybeExecuteScript(src) { // With HMR we might need to "reload" scripts when they are // disposed and readded. Executing scripts twice has no functional // differences if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; else { return appendScript(src); } } function fetchStyleSheet(href) { let prom = styleSheets.get(href); if (prom) { return prom; } styleSheets.set(href, prom = fetch(href, { credentials: 'same-origin' }).then((res)=>{ if (!res.ok) { throw Object.defineProperty(new Error("Failed to load stylesheet: " + href), "__NEXT_ERROR_CODE", { value: "E189", enumerable: false, configurable: true }); } return res.text().then((text)=>({ href: href, content: text })); }).catch((err)=>{ throw markAssetError(err); })); return prom; } return { whenEntrypoint (route) { return withFuture(route, entrypoints); }, onEntrypoint (route, execute) { ; (execute ? Promise.resolve().then(()=>execute()).then((exports1)=>({ component: exports1 && exports1.default || exports1, exports: exports1 }), (err)=>({ error: err })) : Promise.resolve(undefined)).then((input)=>{ const old = entrypoints.get(route); if (old && 'resolve' in old) { if (input) { entrypoints.set(route, input); old.resolve(input); } } else { if (input) { entrypoints.set(route, input); } else { entrypoints.delete(route); } // when this entrypoint has been resolved before // the route is outdated and we want to invalidate // this cache entry routes.delete(route); } }); }, loadRoute (route, prefetch) { return withFuture(route, routes, ()=>{ let devBuildPromiseResolve; if ("TURBOPACK compile-time truthy", 1) { devBuildPromise = new Promise((resolve)=>{ devBuildPromiseResolve = resolve; }); } return resolvePromiseWithTimeout(getFilesForRoute(assetPrefix, route).then((param)=>{ let { scripts, css } = param; return Promise.all([ entrypoints.has(route) ? [] : Promise.all(scripts.map(maybeExecuteScript)), Promise.all(css.map(fetchStyleSheet)) ]); }).then((res)=>{ return this.whenEntrypoint(route).then((entrypoint)=>({ entrypoint, styles: res[1] })); }), MS_MAX_IDLE_DELAY, markAssetError(Object.defineProperty(new Error("Route did not complete loading: " + route), "__NEXT_ERROR_CODE", { value: "E12", enumerable: false, configurable: true }))).then((param)=>{ let { entrypoint, styles } = param; const res = Object.assign({ styles: styles }, entrypoint); return 'error' in entrypoint ? entrypoint : res; }).catch((err)=>{ if (prefetch) { // we don't want to cache errors during prefetch throw err; } return { error: err }; }).finally(()=>devBuildPromiseResolve == null ? void 0 : devBuildPromiseResolve()); }); }, prefetch (route) { // https://github.com/GoogleChromeLabs/quicklink/blob/453a661fa1fa940e2d2e044452398e38c67a98fb/src/index.mjs#L115-L118 // License: Apache 2.0 let cn; if (cn = navigator.connection) { // Don't prefetch if using 2G or if Save-Data is enabled. if (cn.saveData || /2g/.test(cn.effectiveType)) return Promise.resolve(); } return getFilesForRoute(assetPrefix, route).then((output)=>Promise.all(canPrefetch ? output.scripts.map((script)=>prefetchViaDom(script.toString(), 'script')) : [])).then(()=>{ (0, _requestidlecallback.requestIdleCallback)(()=>this.loadRoute(route, true).catch(()=>{})); }).catch(()=>{}); } }; } if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { Object.defineProperty(exports.default, '__esModule', { value: true }); Object.assign(exports.default, exports); module.exports = exports.default; } //# sourceMappingURL=route-loader.js.map }), "[project]/node_modules/next/dist/client/page-loader.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; var __TURBOPACK__imported__module__$5b$project$5d2f$node_modules$2f$next$2f$dist$2f$build$2f$polyfills$2f$process$2e$js__$5b$client$5d$__$28$ecmascript$29$__ = /*#__PURE__*/ __turbopack_context__.i("[project]/node_modules/next/dist/build/polyfills/process.js [client] (ecmascript)"); "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); Object.defineProperty(exports, "default", { enumerable: true, get: function() { return PageLoader; } }); const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [client] (ecmascript)"); const _addbasepath = __turbopack_context__.r("[project]/node_modules/next/dist/client/add-base-path.js [client] (ecmascript)"); const _interpolateas = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/interpolate-as.js [client] (ecmascript)"); const _getassetpathfromroute = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/get-asset-path-from-route.js [client] (ecmascript)")); const _addlocale = __turbopack_context__.r("[project]/node_modules/next/dist/client/add-locale.js [client] (ecmascript)"); const _isdynamic = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/is-dynamic.js [client] (ecmascript)"); const _parserelativeurl = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/parse-relative-url.js [client] (ecmascript)"); const _removetrailingslash = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/router/utils/remove-trailing-slash.js [client] (ecmascript)"); const _routeloader = __turbopack_context__.r("[project]/node_modules/next/dist/client/route-loader.js [client] (ecmascript)"); const _constants = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/constants.js [client] (ecmascript)"); class PageLoader { getPageList() { if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; else { if (window.__DEV_PAGES_MANIFEST) { return window.__DEV_PAGES_MANIFEST.pages; } else { this.promisedDevPagesManifest || (this.promisedDevPagesManifest = fetch(this.assetPrefix + "/_next/static/development/" + _constants.DEV_CLIENT_PAGES_MANIFEST, { credentials: 'same-origin' }).then((res)=>res.json()).then((manifest)=>{ window.__DEV_PAGES_MANIFEST = manifest; return manifest.pages; }).catch((err)=>{ console.log("Failed to fetch devPagesManifest:", err); throw Object.defineProperty(new Error("Failed to fetch _devPagesManifest.json. Is something blocking that network request?\n" + 'Read more: https://nextjs.org/docs/messages/failed-to-fetch-devpagesmanifest'), "__NEXT_ERROR_CODE", { value: "E423", enumerable: false, configurable: true }); })); return this.promisedDevPagesManifest; } } } getMiddleware() { // Webpack production if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; else if ("TURBOPACK compile-time falsy", 0) //TURBOPACK unreachable ; else { if (window.__DEV_MIDDLEWARE_MATCHERS) { return window.__DEV_MIDDLEWARE_MATCHERS; } else { if (!this.promisedMiddlewareMatchers) { // TODO: Decide what should happen when fetching fails instead of asserting // @ts-ignore this.promisedMiddlewareMatchers = fetch(this.assetPrefix + "/_next/static/" + this.buildId + "/" + _constants.DEV_CLIENT_MIDDLEWARE_MANIFEST, { credentials: 'same-origin' }).then((res)=>res.json()).then((matchers)=>{ window.__DEV_MIDDLEWARE_MATCHERS = matchers; return matchers; }).catch((err)=>{ console.log("Failed to fetch _devMiddlewareManifest", err); }); } // TODO Remove this assertion as this could be undefined return this.promisedMiddlewareMatchers; } } } getDataHref(params) { const { asPath, href, locale } = params; const { pathname: hrefPathname, query, search } = (0, _parserelativeurl.parseRelativeUrl)(href); const { pathname: asPathname } = (0, _parserelativeurl.parseRelativeUrl)(asPath); const route = (0, _removetrailingslash.removeTrailingSlash)(hrefPathname); if (route[0] !== '/') { throw Object.defineProperty(new Error('Route name should start with a "/", got "' + route + '"'), "__NEXT_ERROR_CODE", { value: "E303", enumerable: false, configurable: true }); } const getHrefForSlug = (path)=>{ const dataRoute = (0, _getassetpathfromroute.default)((0, _removetrailingslash.removeTrailingSlash)((0, _addlocale.addLocale)(path, locale)), '.json'); return (0, _addbasepath.addBasePath)("/_next/data/" + this.buildId + dataRoute + search, true); }; return getHrefForSlug(params.skipInterpolation ? asPathname : (0, _isdynamic.isDynamicRoute)(route) ? (0, _interpolateas.interpolateAs)(hrefPathname, asPathname, query).result : route); } _isSsg(/** the route (file-system path) */ route) { return this.promisedSsgManifest.then((manifest)=>manifest.has(route)); } loadPage(route) { return this.routeLoader.loadRoute(route).then((res)=>{ if ('component' in res) { return { page: res.component, mod: res.exports, styleSheets: res.styles.map((o)=>({ href: o.href, text: o.content })) }; } throw res.error; }); } prefetch(route) { return this.routeLoader.prefetch(route); } constructor(buildId, assetPrefix){ this.routeLoader = (0, _routeloader.createRouteLoader)(assetPrefix); this.buildId = buildId; this.assetPrefix = assetPrefix; this.promisedSsgManifest = new Promise((resolve)=>{ if (window.__SSG_MANIFEST) { resolve(window.__SSG_MANIFEST); } else { window.__SSG_MANIFEST_CB = ()=>{ resolve(window.__SSG_MANIFEST); }; } }); } } if ((typeof exports.default === 'function' || typeof exports.default === 'object' && exports.default !== null) && typeof exports.default.__esModule === 'undefined') { Object.defineProperty(exports.default, '__esModule', { value: true }); Object.assign(exports.default, exports); module.exports = exports.default; } //# sourceMappingURL=page-loader.js.map }), "[project]/node_modules/next/dist/client/script.js [client] (ecmascript)", ((__turbopack_context__, module, exports) => { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); 0 && (module.exports = { default: null, handleClientScriptLoad: null, initScriptLoader: null }); function _export(target, all) { for(var name in all)Object.defineProperty(target, name, { enumerable: true, get: all[name] }); } _export(exports, { default: function() { return _default; }, handleClientScriptLoad: function() { return handleClientScriptLoad; }, initScriptLoader: function() { return initScriptLoader; } }); const _interop_require_default = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_default.cjs [client] (ecmascript)"); const _interop_require_wildcard = __turbopack_context__.r("[project]/node_modules/@swc/helpers/cjs/_interop_require_wildcard.cjs [client] (ecmascript)"); const _jsxruntime = __turbopack_context__.r("[project]/node_modules/react/jsx-runtime.js [client] (ecmascript)"); const _reactdom = /*#__PURE__*/ _interop_require_default._(__turbopack_context__.r("[project]/node_modules/react-dom/index.js [client] (ecmascript)")); const _react = /*#__PURE__*/ _interop_require_wildcard._(__turbopack_context__.r("[project]/node_modules/react/index.js [client] (ecmascript)")); const _headmanagercontextsharedruntime = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/head-manager-context.shared-runtime.js [client] (ecmascript)"); const _setattributesfromprops = __turbopack_context__.r("[project]/node_modules/next/dist/client/set-attributes-from-props.js [client] (ecmascript)"); const _requestidlecallback = __turbopack_context__.r("[project]/node_modules/next/dist/client/request-idle-callback.js [client] (ecmascript)"); const _htmlescape = __turbopack_context__.r("[project]/node_modules/next/dist/shared/lib/htmlescape.js [client] (ecmascript)"); const ScriptCache = new Map(); const LoadCache = new Set(); const insertStylesheets = (stylesheets)=>{ // Case 1: Styles for afterInteractive/lazyOnload with appDir injected via handleClientScriptLoad // // Using ReactDOM.preinit to feature detect appDir and inject styles // Stylesheets might have already been loaded if initialized with Script component // Re-inject styles here to handle scripts loaded via handleClientScriptLoad // ReactDOM.preinit handles dedup and ensures the styles are loaded only once if (_reactdom.default.preinit) { stylesheets.forEach((stylesheet)=>{ _reactdom.default.preinit(stylesheet, { as: 'style' }); }); return; } // Case 2: Styles for afterInteractive/lazyOnload with pages injected via handleClientScriptLoad // // We use this function to load styles when appdir is not detected // TODO: Use React float APIs to load styles once available for pages dir if (typeof window !== 'undefined') { let head = document.head; stylesheets.forEach((stylesheet)=>{ let link = document.createElement('link'); link.type = 'text/css'; link.rel = 'stylesheet'; link.href = stylesheet; head.appendChild(link); }); } }; const loadScript = (props)=>{ const { src, id, onLoad = ()=>{}, onReady = null, dangerouslySetInnerHTML, children = '', strategy = 'afterInteractive', onError, stylesheets } = props; const cacheKey = id || src; // Script has already loaded if (cacheKey && LoadCache.has(cacheKey)) { return; } // Contents of this script are already loading/loaded if (ScriptCache.has(src)) { LoadCache.add(cacheKey); // It is possible that multiple `next/script` components all have same "src", but has different "onLoad" // This is to make sure the same remote script will only load once, but "onLoad" are executed in order ScriptCache.get(src).then(onLoad, onError); return; } /** Execute after the script first loaded */ const afterLoad = ()=>{ // Run onReady for the first time after load event if (onReady) { onReady(); } // add cacheKey to LoadCache when load successfully LoadCache.add(cacheKey); }; const el = document.createElement('script'); const loadPromise = new Promise((resolve, reject)=>{ el.addEventListener('load', function(e) { resolve(); if (onLoad) { onLoad.call(this, e); } afterLoad(); }); el.addEventListener('error', function(e) { reject(e); }); }).catch(function(e) { if (onError) { onError(e); } }); if (dangerouslySetInnerHTML) { // Casting since lib.dom.d.ts doesn't have TrustedHTML yet. el.innerHTML = dangerouslySetInnerHTML.__html || ''; afterLoad(); } else if (children) { el.textContent = typeof children === 'string' ? children : Array.isArray(children) ? children.join('') : ''; afterLoad(); } else if (src) { el.src = src; // do not add cacheKey into LoadCache for remote script here // cacheKey will be added to LoadCache when it is actually loaded (see loadPromise above) ScriptCache.set(src, loadPromise); } (0, _setattributesfromprops.setAttributesFromProps)(el, props); if (strategy === 'worker') { el.setAttribute('type', 'text/partytown'); } el.setAttribute('data-nscript', strategy); // Load styles associated with this script if (stylesheets) { insertStylesheets(stylesheets); } document.body.appendChild(el); }; function handleClientScriptLoad(props) { const { strategy = 'afterInteractive' } = props; if (strategy === 'lazyOnload') { window.addEventListener('load', ()=>{ (0, _requestidlecallback.requestIdleCallback)(()=>loadScript(props)); }); } else { loadScript(props); } } function loadLazyScript(props) { if (document.readyState === 'complete') { (0, _requestidlecallback.requestIdleCallback)(()=>loadScript(props)); } else { window.addEventListener('load', ()=>{ (0, _requestidlecallback.requestIdleCallback)(()=>loadScript(props)); }); } } function addBeforeInteractiveToCache() { const scripts = [ ...document.querySelectorAll('[data-nscript="beforeInteractive"]'), ...document.querySelectorAll('[data-nscript="beforePageRender"]') ]; scripts.forEach((script)=>{ const cacheKey = script.id || script.getAttribute('src'); LoadCache.add(cacheKey); }); } function initScriptLoader(scriptLoaderItems) { scriptLoaderItems.forEach(handleClientScriptLoad); addBeforeInteractiveToCache(); } /** * Load a third-party scripts in an optimized way. * * Read more: [Next.js Docs: `next/script`](https://nextjs.org/docs/app/api-reference/components/script) */ function Script(props) { const { id, src = '', onLoad = ()=>{}, onReady = null, strategy = 'afterInteractive', onError, stylesheets, ...restProps } = props; // Context is available only during SSR let { updateScripts, scripts, getIsSsr, appDir, nonce } = (0, _react.useContext)(_headmanagercontextsharedruntime.HeadManagerContext); // if a nonce is explicitly passed to the script tag, favor that over the automatic handling nonce = restProps.nonce || nonce; /** * - First mount: * 1. The useEffect for onReady executes * 2. hasOnReadyEffectCalled.current is false, but the script hasn't loaded yet (not in LoadCache) * onReady is skipped, set hasOnReadyEffectCalled.current to true * 3. The useEffect for loadScript executes * 4. hasLoadScriptEffectCalled.current is false, loadScript executes * Once the script is loaded, the onLoad and onReady will be called by then * [If strict mode is enabled / is wrapped in component] * 5. The useEffect for onReady executes again * 6. hasOnReadyEffectCalled.current is true, so entire effect is skipped * 7. The useEffect for loadScript executes again * 8. hasLoadScriptEffectCalled.current is true, so entire effect is skipped * * - Second mount: * 1. The useEffect for onReady executes * 2. hasOnReadyEffectCalled.current is false, but the script has already loaded (found in LoadCache) * onReady is called, set hasOnReadyEffectCalled.current to true * 3. The useEffect for loadScript executes * 4. The script is already loaded, loadScript bails out * [If strict mode is enabled / is wrapped in component] * 5. The useEffect for onReady executes again * 6. hasOnReadyEffectCalled.current is true, so entire effect is skipped * 7. The useEffect for loadScript executes again * 8. hasLoadScriptEffectCalled.current is true, so entire effect is skipped */ const hasOnReadyEffectCalled = (0, _react.useRef)(false); (0, _react.useEffect)(()=>{ const cacheKey = id || src; if (!hasOnReadyEffectCalled.current) { // Run onReady if script has loaded before but component is re-mounted if (onReady && cacheKey && LoadCache.has(cacheKey)) { onReady(); } hasOnReadyEffectCalled.current = true; } }, [ onReady, id, src ]); const hasLoadScriptEffectCalled = (0, _react.useRef)(false); (0, _react.useEffect)(()=>{ if (!hasLoadScriptEffectCalled.current) { if (strategy === 'afterInteractive') { loadScript(props); } else if (strategy === 'lazyOnload') { loadLazyScript(props); } hasLoadScriptEffectCalled.current = true; } }, [ props, strategy ]); if (strategy === 'beforeInteractive' || strategy === 'worker') { if (updateScripts) { scripts[strategy] = (scripts[strategy] || []).concat([ { id, src, onLoad, onReady, onError, ...restProps, nonce } ]); updateScripts(scripts); } else if (getIsSsr && getIsSsr()) { // Script has already loaded during SSR LoadCache.add(id || src); } else if (getIsSsr && !getIsSsr()) { loadScript({ ...props, nonce }); } } // For the app directory, we need React Float to preload these scripts. if (appDir) { // Injecting stylesheets here handles beforeInteractive and worker scripts correctly // For other strategies injecting here ensures correct stylesheet order // ReactDOM.preinit handles loading the styles in the correct order, // also ensures the stylesheet is loaded only once and in a consistent manner // // Case 1: Styles for beforeInteractive/worker with appDir - handled here // Case 2: Styles for beforeInteractive/worker with pages dir - Not handled yet // Case 3: Styles for afterInteractive/lazyOnload with appDir - handled here // Case 4: Styles for afterInteractive/lazyOnload with pages dir - handled in insertStylesheets function if (stylesheets) { stylesheets.forEach((styleSrc)=>{ _reactdom.default.preinit(styleSrc, { as: 'style' }); }); } // Before interactive scripts need to be loaded by Next.js' runtime instead // of native